package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.dragon.mmochat.model.role.MmochatPlayer;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiProtocolMessage;

public class Mmochat_7_15S extends SkymobiProtocolMessage {
	int dealId;
	MmochatPlayer dealer; // 交易方

	public Mmochat_7_15S() {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_S_7_15);
	}

	@Override
	protected void encodeBody(SkymobiBuffer out) {
		out.putInt(dealId);
		out.putPrefixedString(dealer.getName(), 1);
		out.putInt(dealer.getLevel());
	}

	public void setDealer(MmochatPlayer dealer) {
		this.dealer = dealer;
	}

	public void setDealId(int dealId) {
		this.dealId = dealId;
	}

}
